﻿<?xml version="1.0" encoding="utf-8"?>
<xs:schema id="SurveyIPRangeData" targetNamespace="http://tempuri.org/SurveyIPRangeData.xsd" xmlns:mstns="http://tempuri.org/SurveyIPRangeData.xsd" xmlns="http://tempuri.org/SurveyIPRangeData.xsd" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata" xmlns:msprop="urn:schemas-microsoft-com:xml-msprop" attributeFormDefault="qualified" elementFormDefault="qualified">
  <xs:annotation>
    <xs:appinfo source="urn:schemas-microsoft-com:xml-msdatasource">
      <DataSource DefaultConnectionIndex="0" FunctionsComponentName="QueriesTableAdapter" Modifier="AutoLayout, AnsiClass, Class, Public" SchemaSerializationMode="IncludeSchema" xmlns="urn:schemas-microsoft-com:xml-msdatasource">
        <Connections>
          <Connection AppSettingsObjectName="Settings" AppSettingsPropertyName="SurveyDevConnectionString" ConnectionStringObject="" IsAppSettingsProperty="true" Modifier="Assembly" Name="SurveyDevConnectionString (Settings)" ParameterPrefix="@" PropertyReference="ApplicationSettings.Votations.NSurvey.BE.Properties.Settings.GlobalReference.Default.SurveyDevConnectionString" Provider="System.Data.SqlClient" />
        </Connections>
        <Tables>
          <TableAdapter BaseClass="System.ComponentModel.Component" DataAccessorModifier="AutoLayout, AnsiClass, Class, Public" DataAccessorName="SurveyIPRangeTableAdapter" GeneratorDataComponentClassName="SurveyIPRangeTableAdapter" Name="SurveyIPRange" UserDataComponentName="SurveyIPRangeTableAdapter">
            <MainSource>
              <DbSource ConnectionRef="SurveyDevConnectionString (Settings)" DbObjectName="SurveyDev.dbo.vts_tbSurveyIPRange" DbObjectType="Table" FillMethodModifier="Public" FillMethodName="Fill" GenerateMethods="Both" GenerateShortCommands="true" GeneratorGetMethodName="GetData" GeneratorSourceName="Fill" GetMethodModifier="Public" GetMethodName="GetData" QueryType="Rowset" ScalarCallRetval="System.Object, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="true" UserGetMethodName="GetData" UserSourceName="Fill">
                <DeleteCommand>
                  <DbCommand CommandType="Text" ModifiedByUser="false">
                    <CommandText>DELETE FROM [dbo].[vts_tbSurveyIPRange] WHERE (([SurveyIPRangeId] = @Original_SurveyIPRangeId) AND ([SurveyId] = @Original_SurveyId) AND ([IPStart] = @Original_IPStart) AND ([IPEnd] = @Original_IPEnd))</CommandText>
                    <Parameters>
                      <Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@Original_SurveyIPRangeId" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="SurveyIPRangeId" SourceColumnNullMapping="false" SourceVersion="Original" />
                      <Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@Original_SurveyId" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="SurveyId" SourceColumnNullMapping="false" SourceVersion="Original" />
                      <Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@Original_IPStart" Precision="0" ProviderType="VarChar" Scale="0" Size="0" SourceColumn="IPStart" SourceColumnNullMapping="false" SourceVersion="Original" />
                      <Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@Original_IPEnd" Precision="0" ProviderType="VarChar" Scale="0" Size="0" SourceColumn="IPEnd" SourceColumnNullMapping="false" SourceVersion="Original" />
                    </Parameters>
                  </DbCommand>
                </DeleteCommand>
                <InsertCommand>
                  <DbCommand CommandType="Text" ModifiedByUser="false">
                    <CommandText>INSERT INTO [dbo].[vts_tbSurveyIPRange] ([SurveyId], [IPStart], [IPEnd]) VALUES (@SurveyId, @IPStart, @IPEnd);
SELECT SurveyIPRangeId, SurveyId, IPStart, IPEnd FROM vts_tbSurveyIPRange WHERE (SurveyIPRangeId = SCOPE_IDENTITY())</CommandText>
                    <Parameters>
                      <Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@SurveyId" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="SurveyId" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@IPStart" Precision="0" ProviderType="VarChar" Scale="0" Size="0" SourceColumn="IPStart" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@IPEnd" Precision="0" ProviderType="VarChar" Scale="0" Size="0" SourceColumn="IPEnd" SourceColumnNullMapping="false" SourceVersion="Current" />
                    </Parameters>
                  </DbCommand>
                </InsertCommand>
                <SelectCommand>
                  <DbCommand CommandType="Text" ModifiedByUser="false">
                    <CommandText>SELECT SurveyIPRangeId, SurveyId, IPStart, IPEnd FROM dbo.vts_tbSurveyIPRange</CommandText>
                    <Parameters />
                  </DbCommand>
                </SelectCommand>
                <UpdateCommand>
                  <DbCommand CommandType="Text" ModifiedByUser="false">
                    <CommandText>UPDATE [dbo].[vts_tbSurveyIPRange] SET [SurveyId] = @SurveyId, [IPStart] = @IPStart, [IPEnd] = @IPEnd WHERE (([SurveyIPRangeId] = @Original_SurveyIPRangeId) AND ([SurveyId] = @Original_SurveyId) AND ([IPStart] = @Original_IPStart) AND ([IPEnd] = @Original_IPEnd));
SELECT SurveyIPRangeId, SurveyId, IPStart, IPEnd FROM vts_tbSurveyIPRange WHERE (SurveyIPRangeId = @SurveyIPRangeId)</CommandText>
                    <Parameters>
                      <Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@SurveyId" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="SurveyId" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@IPStart" Precision="0" ProviderType="VarChar" Scale="0" Size="0" SourceColumn="IPStart" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@IPEnd" Precision="0" ProviderType="VarChar" Scale="0" Size="0" SourceColumn="IPEnd" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@Original_SurveyIPRangeId" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="SurveyIPRangeId" SourceColumnNullMapping="false" SourceVersion="Original" />
                      <Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@Original_SurveyId" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="SurveyId" SourceColumnNullMapping="false" SourceVersion="Original" />
                      <Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@Original_IPStart" Precision="0" ProviderType="VarChar" Scale="0" Size="0" SourceColumn="IPStart" SourceColumnNullMapping="false" SourceVersion="Original" />
                      <Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@Original_IPEnd" Precision="0" ProviderType="VarChar" Scale="0" Size="0" SourceColumn="IPEnd" SourceColumnNullMapping="false" SourceVersion="Original" />
                      <Parameter AllowDbNull="false" AutogeneratedName="SurveyIPRangeId" ColumnName="SurveyIPRangeId" DataSourceName="" DataTypeServer="int" DbType="Int32" Direction="Input" ParameterName="@SurveyIPRangeId" Precision="0" ProviderType="Int" Scale="0" Size="4" SourceColumn="SurveyIPRangeId" SourceColumnNullMapping="false" SourceVersion="Current" />
                    </Parameters>
                  </DbCommand>
                </UpdateCommand>
              </DbSource>
            </MainSource>
            <Mappings>
              <Mapping SourceColumn="SurveyIPRangeId" DataSetColumn="SurveyIPRangeId" />
              <Mapping SourceColumn="SurveyId" DataSetColumn="SurveyId" />
              <Mapping SourceColumn="IPStart" DataSetColumn="IPStart" />
              <Mapping SourceColumn="IPEnd" DataSetColumn="IPEnd" />
            </Mappings>
            <Sources />
          </TableAdapter>
        </Tables>
        <Sources />
      </DataSource>
    </xs:appinfo>
  </xs:annotation>
  <xs:element name="SurveyIPRangeData" msdata:IsDataSet="true" msdata:UseCurrentLocale="true" msprop:EnableTableAdapterManager="true" msprop:Generator_DataSetName="SurveyIPRangeData" msprop:Generator_UserDSName="SurveyIPRangeData">
    <xs:complexType>
      <xs:choice minOccurs="0" maxOccurs="unbounded">
        <xs:element name="SurveyIPRange" msprop:Generator_TableClassName="SurveyIPRangeDataTable" msprop:Generator_TableVarName="tableSurveyIPRange" msprop:Generator_TablePropName="SurveyIPRange" msprop:Generator_RowDeletingName="SurveyIPRangeRowDeleting" msprop:Generator_UserTableName="SurveyIPRange" msprop:Generator_RowChangingName="SurveyIPRangeRowChanging" msprop:Generator_RowEvHandlerName="SurveyIPRangeRowChangeEventHandler" msprop:Generator_RowDeletedName="SurveyIPRangeRowDeleted" msprop:Generator_RowEvArgName="SurveyIPRangeRowChangeEvent" msprop:Generator_RowChangedName="SurveyIPRangeRowChanged" msprop:Generator_RowClassName="SurveyIPRangeRow">
          <xs:complexType>
            <xs:sequence>
              <xs:element name="SurveyIPRangeId" msdata:ReadOnly="true" msdata:AutoIncrement="true" msdata:AutoIncrementSeed="-1" msdata:AutoIncrementStep="-1" msprop:Generator_ColumnVarNameInTable="columnSurveyIPRangeId" msprop:Generator_ColumnPropNameInRow="SurveyIPRangeId" msprop:Generator_ColumnPropNameInTable="SurveyIPRangeIdColumn" msprop:Generator_UserColumnName="SurveyIPRangeId" type="xs:int" />
              <xs:element name="SurveyId" msprop:Generator_ColumnVarNameInTable="columnSurveyId" msprop:Generator_ColumnPropNameInRow="SurveyId" msprop:Generator_ColumnPropNameInTable="SurveyIdColumn" msprop:Generator_UserColumnName="SurveyId" type="xs:int" />
              <xs:element name="IPStart" msprop:Generator_ColumnVarNameInTable="columnIPStart" msprop:Generator_ColumnPropNameInRow="IPStart" msprop:Generator_ColumnPropNameInTable="IPStartColumn" msprop:Generator_UserColumnName="IPStart">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="50" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="IPEnd" msprop:Generator_ColumnVarNameInTable="columnIPEnd" msprop:Generator_ColumnPropNameInRow="IPEnd" msprop:Generator_ColumnPropNameInTable="IPEndColumn" msprop:Generator_UserColumnName="IPEnd">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="50" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
            </xs:sequence>
          </xs:complexType>
        </xs:element>
      </xs:choice>
    </xs:complexType>
    <xs:unique name="Constraint1" msdata:PrimaryKey="true">
      <xs:selector xpath=".//mstns:SurveyIPRange" />
      <xs:field xpath="mstns:SurveyIPRangeId" />
    </xs:unique>
  </xs:element>
</xs:schema>